﻿using System.Runtime.Serialization;

namespace TimeTravel.Components
{
    /// <summary>
    /// 友情链接
    /// </summary>
    [DataContract]
    public class FriendLinkInfo : BaseComponent
    {
        /// <summary>
        /// 链接名称
        /// </summary>	
        [DataMember(Name = "name")]	
        public string Name { get; set; }
        /// <summary>
        /// 链接地址
        /// </summary>
        [DataMember(Name = "linkurl")]
        public string LinkUrl { get; set; }
        /// <summary>
        /// 链接排序（越大越靠前，默认为0）
        /// </summary>		
        private int _sort;
        [DataMember(Name = "sort")]
        public int Sort
        {
            get { return _sort; }
            set 
            {
                if (value<0)
                {
                    value = 0;
                }
                _sort = value;
            }
        }
        /// <summary>
        /// 添加时间（时间戳格式）
        /// </summary>	
        [DataMember(Name = "addtime")]	
        public int AddTime { get; set; }
    }
}